From a6796c239bc5a202718ad8f3be6b04c2a899490d Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Mon, 16 May 2005 20:21:34 +0000 Subject: [PATCH] bitkeeper revision 1.1159.258.132 (428900ceGeeOt2WYcJ01WZMZCdJCHA) Fix multi-page I/O accesses in the blkback driver in cases where we receive partial-completion callbacks. Signed-off-by: Vincent Hanquez Signed-off-by: Keir Fraser --- linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c b/linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c index 375377b138..dc15b20180 100644 --- a/linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c +++ b/linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c @@ -252,8 +252,9 @@ static void end_block_io_op(struct buffer_head *bh, int uptodate) #else static int end_block_io_op(struct bio *bio, unsigned int done, int error) { - if ( done || error ) - __end_block_io_op(bio->bi_private, (done && !error)); + if ( bio->bi_size != 0 ) + return 1; + __end_block_io_op(bio->bi_private, !error); bio_put(bio); return error; } -- 2.30.2